package com.bigknow.appstore.proxy.handler.base;

import com.bigknow.appstore.proxy.cache.ICacheManager;
import com.bigknow.appstore.proxy.cache.IProxyResourceMetaCache;
import com.bigknow.appstore.proxy.enumerate.ErrorType;
import com.bigknow.appstore.proxy.exceptions.processor.impl.ErrorHelper;
import com.bigknow.appstore.proxy.log.ILogWriter;
import com.bigknow.appstore.proxy.server.IProxyServer;
import com.bigknow.appstore.proxy.util.HandlerVariables;
import com.bigknow.appstore.proxy.vo.RequestVo;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpMessage;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Serializable;

import static com.bigknow.appstore.common.Assert.assertNotNull;

/**
 * inboud和outbound的基类
 * Created by chaos on 2016/9/23.
 */
public class BaseAdapter implements Serializable{

    protected IProxyServer proxyServer;

    protected ICacheManager cacheManager;

    protected ILogWriter writer;

    public BaseAdapter(IProxyServer proxyServer, ICacheManager cacheManager, ILogWriter writer){
        assertNotNull(cacheManager);
        assertNotNull(writer);
        this.cacheManager = cacheManager;
        this.writer = writer;
        this.proxyServer = proxyServer;
    }


}
